<!-- 推广设置管理 -->
<template>
    <div >
        <a-tabs v-model="active">
            <a-tab-pane :key="1" tab="佣金比例设置">
                <config ref="config" v-if="hasPower('saveAwardConfig')"/>
            </a-tab-pane>
            <a-tab-pane :key="2" tab="商务经理信息设置">
                <member ref="member" v-if="hasPower('createBusinessManage')"/>
            </a-tab-pane>
            <a-button v-if="active == 1 && hasPower('saveAwardConfig')" type='' slot="tabBarExtraContent" @click="queryConfigBill">
                修改记录
            </a-button>
            <a-button v-if="active == 2 && hasPower('createBusinessManage')" type='primary' slot="tabBarExtraContent" @click="childAdd">
                添加商务经理
            </a-button>
        </a-tabs>

    </div>
</template>

<script>
import config from './components/config';
import member from './components/member';
export default {
    components: {
        config,
        member,
    },
    data () {
        return {
            active: 1,
            mode: 'one'
        };
    },

    methods: {
        // 调用商务经理信息设置的添加功能
        childAdd(){
            this.$refs.member.add();
        },
        // 查询推广设置修改记录
        queryConfigBill(){
            this.$refs.config.getConfigRecord();
        },
    }
}

</script>
<style scoped>

</style>